package com.atcumt.meituan;

/* 
 * 运行结果：
 * grandpa in static
 * father in static
 * 25
 */
public class initDemo {
    public static void main(String[] args) {
        System.out.println(Son.factor);
    }
}

class Grandpa {
    static {
        System.out.println("grandpa in static");
    }
}

class Father extends Grandpa {
    static {
        System.out.println("father in static");
    }

    public static int factor = 25;

    public Father() {
        System.out.println("I am father");
    }
}

class Son extends Father {
    static {
        System.out.println("son in static");
    }

    public Son() {
        System.out.println("I am son");
    }
}

